//2009/08/21 10:49:24
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <sstream>
#include <algorithm>

using namespace std;

class Alliteration
{
public:
    int count(vector <string> words)
    {
        int ret = 0;
        int cnt = 1;
        for (int i=1; i<words.size(); i++)
        {
            if (tolower(words[i][0]) == tolower(words[i-1][0]))
                cnt++;
            else
                if (cnt > 1)
                {
                    ret++;
                    cnt=1;
                }
        }
        if (cnt > 1) ret++;
        return ret;
    }
};
